<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:include="teacher/common :: commonhead">
    <!--<div th:replace="teacher/common :: commonhead"></div>-->
</head>
<head>
    <!--这里写这个页面单独需要的css-->
</head>
<body class="sticky-header">

<section>
    <!--  引入左侧边  -->
    <div th:replace="teacher/common :: left"></div>

    <div class="main-content">
        <div th:replace="teacher/common :: header-section"></div>
        <!--这里开始写东西-->
        <div class="wrapper">

            <section class="panel" th:fragment="homeworkList" id="homeworkList">
                <header class="panel-heading">
                    <span>课程作业</span>
                </header>
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover" id="table">
                            <thead>
                            <tr>
                                <th onclick="test()">学号</th>
                                <th>姓名</th>
                                <th></th>
                                <th th:each="homework : ${homeworks}" th:text="${homework.hwTitle}"></th>
                                <th></th>
                                <th>未完成</th>
                                <th>最高分</th>
                                <th>平均分</th>
                            </tr>
                            </thead>
                            <tr th:each="student : ${students}">
                                <td th:text="${student.stuId}">学号</td>
                                <td th:text="${student.stuName}">姓名</td>
                                <td></td>
                                <td th:each="homework : ${student.getHws}" th:text="${homework.hwsMark == -1 ? '未完成' : homework.hwsMark}"></td>
                                <td></td>
                                <td th:text="${student.unFinished}"></td>
                                <td th:text="${student.maxMark}"></td>
                                <td th:text="${student.avgMark}">平均分</td>
                            </tr>
                            <tbody>
                            </tbody>
                        </table>
                    </div>
                </div>
            </section>

        </div>
    </div>
</section>

<div th:replace="teacher/common :: commonjs"></div>
<script src="js/gradeList.js" th:src="@{/js/gradeList.js}"></script>
</body>
</html>